<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/basicdata/Bas_Company.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/basicdata/Bas_Company.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Bas_Company",
        setup() {
            const table = ref({
                key: "CompanyId",
                footer: "Foots",
                cnName: "公司管理",
                name: "basicdata/Bas_Company",
                newTabEdit: false,
                url: "/Bas_Company/",
                sortName: "CompanyId"
            });
            const editFormFields = ref({"GroupId":"","CompanyCode":"","CompanyName":"","CompanyDesc":"","Enabled":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"SYS_Group","data":[],"title":"集团","field":"GroupId","type":"select"}],
                              [{"title":"公司编号","required":true,"field":"CompanyCode"}],
                              [{"title":"公司名称","required":true,"field":"CompanyName"}],
                              [{"title":"公司描述","field":"CompanyDesc"}],
                              [{"dataKey":"enabled","data":[],"title":"启用","field":"Enabled","type":"switch"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"CompanyCode":"","CompanyName":""});
            const searchFormOptions = ref([[{"title":"公司编号","field":"CompanyCode","type":"like"},{"title":"公司名称","field":"CompanyName","type":"like"}]]);
            const columns = ref([{field:"SysGroup.GroupName",title:"集团名称",type:"string",bind:{ key:"SYS_Group",data:[]},width:150,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyCode",title:"公司编号",type:"string",link:true,sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyName",title:"公司名称",type:"string",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyDesc",title:"公司描述",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"GroupId",title:"集团",type:"bigint",bind:{ key:"SYS_Group",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"启用",type:"sbyte",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyId",title:"公司ID",type:"bigint",width:120,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
